#include "lightoncommand.h"
#include <qDebug>

LightOnCommand::LightOnCommand(Light *light)
    : m_light(light)
{
    if (!m_light)
    {
        qDebug() << "light obj in LightOnCommand is null";
    }
}

void LightOnCommand::execute()
{
    if (m_light)
    {
        m_light->run();
    }
}

void LightOnCommand::undo()
{
    if (m_light)
    {
        m_light->end();
    }
}
